home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / telecomm / archivers / sharutils-4.1.lha / SharUtils-4.1 / man / man1 / shar.1 next >
Encoding:
Text File  |  1994-12-09  |  11.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. SHAR(1)                                                   SHAR(1)
  5.  
  6.  
  7. NAME
  8.        shar - create shell archives
  9.  
  10. SYNOPSIS
  11.        shar [ options ] file ...
  12.        shar -S [ options ]
  13.  
  14. DESCRIPTION
  15.        Shar creates "shell archives" (or shar files) which are in
  16.        text format and can be mailed. These files may be unpacked
  17.        later  by  executing  them  with  /bin/sh.  The  resulting
  18.        archive is sent to standard out unless the  -o  option  is
  19.        given.   A wide range of features provide extensive flexi-
  20.        bility in  manufacturing  shars  and  in  specifying  shar
  21.        "smartness."   Archives may be "vanilla" or comprehensive.
  22.        This manual page reflects shar version 4.0.
  23.  
  24. OPTIONS
  25.        Options have a one letter version starting  with  -  or  a
  26.        long version starting with --. The exception is --help and
  27.        --version which does not have a  short  version.   Options
  28.        can  be  given  in  any order. Some options depend on each
  29.        other:
  30.             The -o option is required if the -l or -L option is used.
  31.             The -n option is required if the -a option is used.
  32.             See -V below.
  33.  
  34.        --version
  35.               Print the version number of the program on standard
  36.               output, then immediately exits.
  37.  
  38.        --help Print a help summary on standard output, then imme-
  39.               diately exits.
  40.  
  41.        -V  --vanilla-operation
  42.               Produce "vanilla" shars which rely  only  upon  the
  43.               existence of sed and echo in the unsharing environ-
  44.               ment.  In addition, "if test"  must  also  be  sup-
  45.               ported  if  the -X option is used.  The -V silently
  46.               disables options offensive to the "network cop" (or
  47.               "brown  shirt"),  but does warn you if it is speci-
  48.               fied with -B, -z, -Z, -p or -M (any of  which  does
  49.               or  might require uudecode, gzip or compress in the
  50.               unsharing environment).
  51.  
  52.        -v  --no-verbose
  53.               Verbose OFF. Disables the inclusion of comments  to
  54.               be output when the archive is unpacked.
  55.  
  56.        -w  --no-character-count
  57.               Do NOT check with 'wc -c' after unpack. The default
  58.               is to check.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                         September 27, 1990                      1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SHAR(1)                                                   SHAR(1)
  71.  
  72.  
  73.        -n name  --archive-name=name
  74.               Name of archive to be included in the header of the
  75.               shar files.  See the -a switch.
  76.  
  77.        -a  --net-headers
  78.               Allows automatic generation of headers:
  79.                    Submitted-by: who@where
  80.                    Archive-name: <name>/part##
  81.               The  <name>  must  be given with the -n switch.  If
  82.               name includes a '/' "/part" isn't used. Thus:
  83.                  -n xyzzy                      produces:
  84.                                                xyzzy/part01
  85.                                                xyzzy/part02
  86.  
  87.                  -n xyzzy/patch                produces:
  88.                                                xyzzy/patch01
  89.                                                xyzzy/patch02
  90.  
  91.                  -n xyzzy/patch01.             produces:
  92.                                                xyzzy/patch01.01
  93.                                                xyzzy/patch01.02
  94.  
  95.               The who@where can be explicitly stated with the  -s
  96.               switch if the default isn't appropriate.  Who@where
  97.               is essentially built as `whoami`@`uname`.
  98.  
  99.        -s who@where  --submitter=who@where
  100.               Override automatically determined submitter name.
  101.  
  102.        -x  --no-check-existing
  103.               Overwrite existing files without checking.  If nei-
  104.               ther  -x nor -X is specified, the unpack will check
  105.               for and not overwrite existing files when unpacking
  106.               the  archive  (unless '-c' is passed as a parameter
  107.               to the script when unpacking).
  108.  
  109.        -X  --query-user
  110.               Interactively overwrite existing files (DO NOT  USE
  111.               FOR SHARS SUBMITTED TO THE NET).
  112.  
  113.        -B  --uuencode
  114.               Treat  all  files  as binary, use uuencode prior to
  115.               packing. This increases the size  of  the  archive.
  116.               The  recipient  must  have  uudecode  in  order  to
  117.               unpack.  (USE OF UUENCODE  IS  NOT  APPRECIATED  BY
  118.               MANY ON THE NET).
  119.  
  120.        -T  --text-files
  121.               Treat all files as text (default).
  122.  
  123.        -z  --gzip
  124.               Gzip  and  uuencode all files prior to packing. The
  125.               recipient must have uudecode and  gzip  (used  with
  126.               -d) in order to unpack (USE OF UUENCODE AND GZIP IS
  127.  
  128.  
  129.  
  130.                         September 27, 1990                      2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SHAR(1)                                                   SHAR(1)
  137.  
  138.  
  139.               NOT APPRECIATED BY MANY ON THE NET).
  140.  
  141.        -Z  --compress
  142.               Compress and uuencode all files prior  to  packing.
  143.               The recipient must have uudecode and compress (used
  144.               with -d) in order to unpack (USE  OF  UUENCODE  AND
  145.               COMPRESS  IS  NOT  APPRECIATED BY MANY ON THE NET).
  146.               Option -C is synonymous to -Z, but is being  depre-
  147.               cated.
  148.  
  149.        -m  --no-timestamp
  150.               Avoid  generating  'touch'  commands to restore the
  151.               file modification dates when unpacking  files  from
  152.               the archive.
  153.  
  154.        -p  --intermix-type
  155.               Allow  positional  parameter  options.  The options
  156.               "-B", "-T", "-z" and  "-Z"  may  be  embedded,  and
  157.               files  to the right of the option will be processed
  158.               in the specified mode.
  159.  
  160.        -g X  --level-for-gzip=X
  161.               When doing compression, use '-X' as a parameter  to
  162.               gzip.   The  -g  option  turns  on the -z option by
  163.               default.
  164.  
  165.        -b X  --bits-per-code=X
  166.               When doing compression, use '-bX' as a parameter to
  167.               compress.   The -B option turns on the -Z option by
  168.               default.
  169.  
  170.        -M  --mixed-uuencode
  171.               Mixed mode.  Determine if the  files  are  text  or
  172.               binary  and  archive  correctly.  Files found to be
  173.               binary are uudecoded prior to packing (USE OF UUEN-
  174.               CODE IS NOT APPRECIATED BY MANY ON THE NET).
  175.  
  176.        -P  --no-piping
  177.               Use  temporary  files  instead of pipes in the shar
  178.               file.
  179.  
  180.        -c  --cut-mark
  181.               Start the shar with a cut line. A line saying  'Cut
  182.               here' is placed at the start of each output file.
  183.  
  184.        -f  --basename
  185.               Restore  by  filename  only, rather than path. This
  186.               option causes only file names to be used, which  is
  187.               useful  when  building a shar from several directo-
  188.               ries, or another directory.  Note that if a  direc-
  189.               tory  name  is  passed to shar, the substructure of
  190.               that directory will be restored whether -f is spec-
  191.               ified or not.
  192.  
  193.  
  194.  
  195.  
  196.                         September 27, 1990                      3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SHAR(1)                                                   SHAR(1)
  203.  
  204.  
  205.        -d XXX  --here-delimiter=XXX
  206.               Use XXX to delimit the files in the shar instead of
  207.               SHAR_EOF.  This is for those who want to  personal-
  208.               ize their shar files.
  209.  
  210.        -F  --force-prefix
  211.               Forces  the  prefix  character (normally 'X' unless
  212.               the parameter to the -d option starts with 'X')  to
  213.               be  prepended  to  every line even if not required.
  214.               This option may slightly increase the size  of  the
  215.               archive, especially if -B or -Z is used.
  216.  
  217.        -o XXX  --output-prefix=XXX
  218.               Save  the  archive  to  files  XXX.01  thru  XXX.nn
  219.               instead of standard out.  Must be used when the  -l
  220.               or the -L switches are used
  221.  
  222.        -l XX  --whole-size-limit=XX
  223.               Limit  the  output file size to XXk bytes but don't
  224.               split input files.
  225.  
  226.        -L XX  --split-size-limit=XX
  227.               Limit output file size to XXk bytes and split files
  228.               if necessary. The archives created with this option
  229.               must be unpacked in correct order.
  230.  
  231.        -S  --stdin-file-list
  232.               Read list of files to be packed from  the  standard
  233.               input  rather  than  from  the command line.  Input
  234.               must be in a form similar to that generated by  the
  235.               find  command,  one filename per line.  This switch
  236.               is especially useful when the command line will not
  237.               hold the list of files to be packed. For example:
  238.  
  239.               find . -type f -print | sort | shar -S -Z -L50 -o /tmp/big
  240.  
  241.               If  -p  is  specified on the command line, then the
  242.               options "-B", "-T", "-z" and "-Z" may  be  included
  243.               in  the  standard  input  (on  a line separate from
  244.               filenames).  The maximum number of lines  of  stan-
  245.               dard  input, file names and options, may not exceed
  246.               1024.
  247.  
  248. EXAMPLES
  249.        shar *.c > cprog.shar                # all C prog sources
  250.        shar -v *.[ch] > cprog.shar          # non-verbose, .c and .h files
  251.        shar -B -l28 -oarc.sh *.arc          # all binary .arc files, into
  252.                                             # files arc.sh.01 thru arc.sh.NN
  253.        shar -f /lcl/src/u*.c > u.sh         # use only the filenames
  254.  
  255. WARNINGS
  256.        No chmod or touch is ever generated for  directories  cre-
  257.        ated  when  unpacking.   Thus,  if a directory is given to
  258.        shar,   the   protection   and   modification   dates   of
  259.  
  260.  
  261.  
  262.                         September 27, 1990                      4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SHAR(1)                                                   SHAR(1)
  269.  
  270.  
  271.        corresponding  unpacked  directory  may not match those of
  272.        the original.
  273.  
  274.        If a directory is passed to shar, it may be  scanned  more
  275.        than  once.   Therefore,  one should be careful not change
  276.        the directory while shar is running.
  277.  
  278.        Be careful that the output file(s) are not included in the
  279.        inputs  or shar may loop until the disk fills up.  Be par-
  280.        ticularly careful when a directory is passed to shar  that
  281.        the output files are not in that directory (or a subdirec-
  282.        tory of that directory).
  283.  
  284.        Use of the -B, -z or -Z, and especially -M, may  slow  the
  285.        archive  process  considerably, depending on the number of
  286.        files.
  287.  
  288.        Use of -X produces shars which WILL  cause  problems  with
  289.        many   unshar  procedures.   Use  this  feature  only  for
  290.        archives to be passed among agreeable parties.  Certainly,
  291.        -X  is NOT for shell archives which are to be submitted to
  292.        Usenet.  Usage of -B, -z or -Z in net shars will cause you
  293.        to  be flamed off the earth.  Not using -m or not using -F
  294.        may also get you occasional complaints.
  295.  
  296. SEE ALSO
  297.        unshar(1)
  298.  
  299. DIAGNOSTICS
  300.        Error messages for illegal or  incompatible  options,  for
  301.        non-regular,   missing   or   inaccessible  files  or  for
  302.        (unlikely) memory allocation failure.
  303.  
  304. AUTHORS
  305.        shar3 is a derived work based on the efforts of:
  306.        decvax!microsof!uw-beave!jim (James Gosling at CMU)
  307.        Michael A. Thompson, Dalhousie University, Halifax, N.S., Canada
  308.        davidsen@sixhub (Bill Davidsen)
  309.        rhg@CPS.COM (Richard H. Gumpertz)
  310.        colas@avahi.inria.fr (Colas Nahaboo)
  311.        bill@netagw.com (Bill Aten)
  312.        dennis%nanovx@gatech.edu (Dennis Boylan)
  313.        wht%n4hgf@gatech.edu (Warren Tucker)
  314.        (other anonymous persons)
  315.  
  316.        man pages:
  317.        jhd@irfu.se (Jan Dj{rv)
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                         September 27, 1990                      5
  329.  
  330.  
  331.